服務器篇之 yum安裝LAMP環境

【1】、準備環境:php

yum添加163源:html

使用yum程序安裝所需開發包:mysql

[root@nosay yum.repos.d]# yum install gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel zlib-devel ncurses-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel pam-devel openssl-devel libxml2-devel gettext-devel pcre-devel mysql-devel net-snmp-devel curl-devel perl-DBI

【2】、安裝LAMP:c++

MySQL:sql

[root@nosay ~]# yum install mysql mysql-server

[root@nosay ~]# chkconfig --levels 235 mysqld on
[root@nosay ~]# service mysqld start

[root@nosay ~]# mysqladmin -u root password liukun

[root@nosay ~]# mysql -uroot -p
Enter password: 

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.00 sec)

mysql> 

Apache:vim

[root@nosay ~]# yum install httpd

[root@nosay ~]# chkconfig --levels 235 httpd on
[root@nosay ~]# service httpd start

[root@nosay ~]# vim /etc/httpd/conf/httpd.conf
#ServerName 127.0.0.1:80

[root@nosay ~]# service httpd restart

PHP:curl

[root@nosay ~]# yum install php

[root@nosay ~]# yum search php
[root@nosay ~]# yum -y install php-mysql php-gd php-lmap php-ldap php-odbc php-pear php-xml php-xmlrpc php-bcmath php-mbstring

[root@nosay ~]# vim /var/www/html/phpinfo.php
[root@nosay ~]# service httpd restart

 phpMyAdmin:flex

下載地址:http://www.phpmyadmin.net/home_page/downloads.phpurl

版本:phpMyAdmin-4.0.10.5-all-languages.tar.gzspa

FTP上傳至:/var/www/html

[root@nosay html]# tar xvfz phpMyAdmin-4.0.10.5-all-languages.tar.gz 

[root@nosay html]# mv phpMyAdmin-4.0.10.5-all-languages phpMyAdmin
[root@nosay html]# cd phpMyAdmin

[root@nosay html]# cp config.sample.inc.php config.inc.php

[root@nosay html]# service httpd restart
相關文章
相關標籤/搜索