If you have trouble with your resolution, things you might want to start googleing are as follows ( This could take you days / weeks to get setup correctly, and even then 90% chance it won't be 100% perfect and glitchy ! Consider this your first introduction to linux )
sudo apt-get install vim-full
Installs / enables the full version of vimWe should firstly update the current ubuntu installation you've just installed to make sure everything is up to date. Simply run the following commands; (Comments in itallic)
sudo apt-get upgrade
Upgrades repositry list of packages for your systemsudo apt-get update
Downloads updated packages / system files and installs. voillaYou will no doubt at some point be needing to ssh into your box, thus, we need to setup ssh.
sudo apt-get install openssh-server
Installs the ssh deamon - This will automatically start after installation and start everytime your system boots.You may then want to take a few ssh config security precautions - Click here to read more from ubuntuforums.org
Assuming your going to be using your new ubuntu machine as a web server, follow the following sets for the ( or my ) 'ultimate web dev setup'
sudo apt-get install apache2
This installs Apache.You may also wish to install the Mod_Rewrite modules for your sexy urls. To do so simply type:
sudo a2enmod rewrite
This enables the mod_rewrite modulesudo apache2 -k force-reload
Reloads apacheThe following code is to install / set up an SSL certificate on your apache2 so you can run scripts on https
wget http://www.theatons.com/test/Linux/apache2-ssl.tar.gz
wget - " a non-interactive network retriever"
tar xzvf apache2-ssl.tar.gz
tar - Create / Extract files from archive
sudo mv ssleay.cnf /usr/share/apache2/
mv Move file / Directory
sudo mv apache2-ssl-certificate /usr/bin/sudo mkdir /etc/apache2/sslsudo apache2-ssl-certificate
executes apache2-ssl-certificate script, you will have to answer a few questions..
sudo a2enmod ssl
sudo ln -s /etc/apache2/sites-available/ssl /etc/apache2/sites-enabled/ssl
ln -s - Create symbolic link
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
cp - Copy File / Directory
sudo gedit /etc/apache2/sites-available/ssl
NameVirtualHost *:443 <VirtualHost *:443> ServerAdmin webmaster@localhost SSLEngine On SSLCertificateFile /etc/apache2/ssl/apache.pem
sudo gedit /etc/apache2/sites-available/default
NameVirtualHost *:80 <VirtualHost *:80>
sudo apt-get install ca-certificates
This installs common CA certificate PEM files (Nessesary for using curl on https)sudo apache2 -k force-reload
reloads apacheYou can check this is by going to https://localhost
This installs and sets up mysql on your server
sudo apt-get install mysql-server libmysqlclient15-dev
You should be prompted to set a root password after the downloads are complete and it begins to unpack
You can now check MySQL is installed and setup correctly on your ubuntu machine by typing: mysql -u root -p. You should then be prompted for your password, then taken to mysql> - The MySQL command line.
If you want more information, check the mysql manual page
This installs / sets up PHP on your computer
sudo apt-get install php5 php5-common libapache2-mod-php5 php5-gd php5-dev curl libcurl3 libcurl3-dev php5-curl php-pear php5-mysql
You can now go and make a .php file and put it in your /var/www ..however, you must restart apache for the php module to be loaded.. - sudo apache2 -k graceful will do the job.
This allows you to have XSLT support for your php installation
sudo apt-get install libapache2-modxslt php5-xsl
You may also want to reload apache again here if you wish to test this at this point: sudo apache2 -k force-reload
Installs ImageMagick onto your box, allowing you to perform easy high quality image manipulations via the linux cli or php
sudo apt-get install imagemagick libmagick9-dev
sudo pecl install imagick
echo "extension=imagick.so" | sudo tee -a /etc/php5/apache2/php.ini
sudo apache2 -k force-reload
reloads apacheYou can check this is installed by making a phpinfo(); file and then just crt+f 'imagick'
Installs and sets up PDO and installs / enables the PDO_MYSQL drivers.. nessesary for getting pdo to interact with MySQL ( Take note idiotic / rip off hosts: eg: FastHosts.co.uk )
sudo pecl install pdo
Installs pdo
sudo pecl install pdo_mysql
Installs PDO_MySQL drivers
echo "extension=pdo.so" | sudo tee -a /etc/php5/apache2/php.iniecho "extension=pdo_mysql.so" | sudo tee -a /etc/php5/apache2/php.ini
sudo apache2 -k force-reload
reloads apacheYou can check this is installed by making a phpinfo(); file and then just crt+f 'pdo' and 'pdo_mysql'
This section details how to setup a samba server with shared files on your ubuntu box, and then how to connect windows to that server
This tutorial is an almost copy / paste of the excellent, detailed how-to provided by Stormbringer on the ubuntu forums. I am simply providing it here so all info is in one place, but once again, credits to this post on ubuntu forums by Stormbringer
sudo apt-get install samba
Installs the samba server filessudo /etc/init.d/samba stop
Stops samba if it is runningsudo mv /etc/samba/smb.conf /etc/samba/smb.conf.template
Rename the existing samba file as a 'template' for future reference if nessesarysudo touch /etc/samba/smb.conf
Make a new empty samba config filesudo gedit /etc/samba/smb.conf
Open the new samba config file for editingHere just copy / paste the following into your /etc/samba/smb.conf
[global]
; General server settings
netbios name = YOUR_HOSTNAME
server string =
workgroup = YOUR_WORKGROUP
announce version = 5.0
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
passdb backend = tdbsam
security = user
null passwords = true
username map = /etc/samba/smbusers
name resolve order = hosts wins bcast
wins support = yes
printing = CUPS
printcap name = CUPS
syslog = 1
syslog only = yes
; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
;valid users = %S
;create mode = 0600
;directory mode = 0755
;browseable = no
;read only = no
;veto files = /*.{*}/.*/mail/bin/
; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
;path = /var/lib/samba/netlogon
;admin users = Administrator
;valid users = %U
;read only = no
; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
;path = /var/lib/samba/profiles
;valid users = %U
;create mode = 0600
;directory mode = 0700
;writeable = yes
;browseable = no
; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
path = /var/lib/samba/printers
browseable = yes
guest ok = yes
read only = yes
write list = root
create mask = 0664
directory mask = 0775
[printers]
path = /tmp
printable = yes
guest ok = yes
browseable = no
; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
;path = /media/cdrom
;browseable = yes
;read only = yes
;guest ok = yes
[MyFiles]
path = /media/samba/
browseable = yes
read only = no
guest ok = no
create mask = 0644
directory mask = 0755
force user = YOUR_USERNAME
force group = YOUR_USERGROUP
You now need to just make sure the settings are correct for your setup..
netbios name = YOUR_HOSTNAME
eg: ntom@ubuntupc .. hostname = 'ubuntupc'workgroup = YOUR_WORKGROUP
Any workgroup name will do, but make sure you windows has the same workgroup name either by setting this the same as your windows pc, or setting your windows pc the same as thiswins support = yes
If your box doesn't have a static ip-address, or you cannot configure your router/server to provide you with a fixed dhcp-lease, change this configuration parameter to "no".[MyFiles]
This is the name of the share. Leave it as it is or adjust it to whatever you prefer. Don't use more than 31 characters and try to avoid spaces!path = /media/samba/
The path for the shared files / directories.force user = YOUR_USERNAME
force group = YOUR_USERNAME
Replace these with the username you will be connecting to ubuntu with.sudo /etc/init.d/samba start
Start sambasudo smbpasswd -L -a your_username
-L - Local mode (must be first option)sudo smbpasswd -L -e your_username
-e - Enable user