Friday, June 17, 2011

installing apache and mysql on ubuntu via the command line

open your terminal window and type

Install Apache

    The following mod-security, ldap, and odbc libraries are optional:

sudo apt-get install apache2 libapache2-mod-php5 php5-gd
sudo apt-get install libapache2-mod-security php5-ldap php5-odbc

    Restart Apache

sudo /etc/init.d/apache2 restart


Install other software

sudo apt-get install openssh-server unattended-upgrades
sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es
sudo apt-get install curl php5-curl php5-xmlrpc
sudo apt-get install clamav-base clamav-freshclam clamav


Install MySQL
sudo apt-get install mysql-server php5-mysql

sudo apt-get dselect-upgrade
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages will be upgraded:
  foo2zjs
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,584 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main foo2zjs i386 20110210dfsg-1ubuntu2.1 [1,584 kB]
Fetched 1,584 kB in 14s (113 kB/s)                                            
(Reading database ... 137965 files and directories currently installed.)
Preparing to replace foo2zjs 20110210dfsg-1ubuntu2 (using .../foo2zjs_20110210dfsg-1ubuntu2.1_i386.deb) ...
Unpacking replacement foo2zjs ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_US.utf8.cache...
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 1 changed doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for python-support ...
Setting up foo2zjs (20110210dfsg-1ubuntu2.1) ...


sudo apt-get install apache2 libapache2-mod-php5 php5-gd
Reading package lists... Done
Building dependency tree      
Reading state information... Done
apache2 is already the newest version.
libapache2-mod-php5 is already the newest version.
php5-gd is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo apt-get install libapache2-mod-security php5-ldap php5-odbc
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Unable to locate package libapache2-mod-security

sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                                                apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

sudo apt-get install openssh-server unattended-upgrades
Reading package lists... Done
Building dependency tree      
Reading state information... Done
unattended-upgrades is already the newest version.
Suggested packages:
  rssh molly-guard openssh-blacklist openssh-blacklist-extra
The following NEW packages will be installed:
  openssh-server ssh-import-id
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 317 kB of archives.
After this operation, 913 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/main openssh-server i386 1:5.8p1-1ubuntu3 [311 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ natty/main ssh-import-id all 2.4-0ubuntu1 [5,934 B]
Fetched 317 kB in 2s (107 kB/s)    
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 137965 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.8p1-1ubuntu3_i386.deb) ...
Selecting previously deselected package ssh-import-id.
Unpacking ssh-import-id (from .../ssh-import-id_2.4-0ubuntu1_all.deb) ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.8p1-1ubuntu3) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
ssh start/running, process 9916
Setting up ssh-import-id (2.4-0ubuntu1) ...

sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es
Reading package lists... Done
Building dependency tree      
Reading state information... Done
aspell-en is already the newest version.
unzip is already the newest version.
zip is already the newest version.
The following NEW packages will be installed:
  aspell-de aspell-es aspell-fr
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 889 kB of archives.
After this operation, 1,614 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/universe aspell-de all 20091006-4.2ubuntu1 [323 kB]

sudo apt-get install curl php5-curl php5-xmlrpc
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libcurl3
The following NEW packages will be installed:
  curl libcurl3 php5-curl php5-xmlrpc
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 455 kB of archives.
After this operation, 1,180 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/main libcurl3 i386 7.21.3-1ubuntu1 [220 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ natty/main curl i386 7.21.3-1ubuntu1 [179 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main php5-curl i386 5.3.5-1ubuntu7.2 [25.2 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main php5-xmlrpc i386 5.3.5-1ubuntu7.2 [31.4 kB]
Fetched 455 kB in 5s (88.5 kB/s)      
Selecting previously deselected package libcurl3.
(Reading database ... 138099 files and directories currently installed.)
Unpacking libcurl3 (from .../libcurl3_7.21.3-1ubuntu1_i386.deb) ...
Selecting previously deselected package curl.
Unpacking curl (from .../curl_7.21.3-1ubuntu1_i386.deb) ...
Selecting previously deselected package php5-curl.
Unpacking php5-curl (from .../php5-curl_5.3.5-1ubuntu7.2_i386.deb) ...
Selecting previously deselected package php5-xmlrpc.
Unpacking php5-xmlrpc (from .../php5-xmlrpc_5.3.5-1ubuntu7.2_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for libapache2-mod-php5 ...
 * Reloading web server config apache2                                          apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                         [ OK ]
Setting up libcurl3 (7.21.3-1ubuntu1) ...
Setting up curl (7.21.3-1ubuntu1) ...
Setting up php5-curl (5.3.5-1ubuntu7.2) ...
Setting up php5-xmlrpc (5.3.5-1ubuntu7.2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

 sudo apt-get install clamav-base clamav-freshclam clamav
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libclamav6 libtommath0
Suggested packages:
  clamav-docs libclamunrar6
The following NEW packages will be installed:
  clamav clamav-base clamav-freshclam libclamav6 libtommath0
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,275 kB of archives.
After this operation, 12.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

sudo apt-get install mysql-server php5-mysql
Reading package lists... Done
Building dependency tree      
Reading state information... Done
mysql-server is already the newest version.
php5-mysql is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

No comments:

Post a Comment