Linux Network configuration
First Use: ifconfig check the network card
If you have only one L0 NIC, you need to open a eth0 network card
Turn on/off network card: ifconfig NIC name Up/down
Eg:ifconfig eth0 up #打开eth0网卡
Configure IP Address: ifconfig NIC IP netmask Subnet mask
Eg:ifconfig eth0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx
Configure default gateway: Route add default GW ' Gateway '
Eg:route Add default GW xxx.xxx.xxx.xxx
Configure DNS server VI/ETC/RESOLV.COMF (after opening there is an example to configure the default DNS to do)
Eg:vi/etc/resolv.comf
ServerName 8.8.8.8.8
Build MySQL Environment:
Install MySQL command: yum-y install MySQL
Installing the MySQL service: Yum install Mysql-server # MANADB
Set MySQL self-boot: chkconfig--levels 235 MySQL on
To set up a MySQL User: mysql_secure_installation
(Set root user password, delete useless user)
Build Apache Environment
Installing apache:yum-y Install httpd
Configure Apache:
Edit/etc/httpd/conf/httpd.conf
Find the following:
#ServerName www.example.com:80
Change to
ServerName localhost:80
Restart Apache service again;
Installing Php:yum install PHP php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc
Restart Apache to make PHP effective
Create a new info.php in the/var/www/html directory (Apache default root directory)
<?php phpinfo ();? >
Test PHP
This article is from the "Creative Pilgrim" blog, so be sure to keep this source http://dearch.blog.51cto.com/10423918/1762894
Linux network Configuration and construction of MySQL, Apache, PHP environment