In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
CENTOS system configuration, I believe that many inexperienced people are helpless, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
1. distribution network
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO is automatically dhcp static to static
BOOTPROTO=static
IPADDR=?
NETMASK=?
GATEWAY=?
My configuration is as follows:
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.10.19.234
NETMASK=255.255.254.0
GETEWAY=10.10.18.254
ONBOOT=yes
TYPE=Ethernet
Note: BOOTPROTO can only use the IP information set in static mode
Start command: #service network restart
------------------------------------------------------------------------------------------------------------------------
2. With FTP
#vim /etc/vsftpd/ftusers and etc/vsftpd/user_list
Add " # " before root and nobody------Modify user permissions ( user_list user access is related to vsftpd.conf)
#vim /etc/selinux/config change selinux=disable(turn off firewall)
Start command: #service vsftpd start
#reboot (close firewall)
--------------------------------------------------------------------------------------------
3. remove older versions
First use the Find command to find the file to delete
#rpm -qa|grep mysql
#rpm -qa|grep MySQL
#rpm -qa|grep php
#rpm -qa|grep http
Delete all files found
#rpm -e --nodeps filename
Check if it is clean.
#rpm -qa|grep mysql
#rpm -qa|grep MySQL
#rpm -qa|grep php
#rpm -qa|grep http
---------------------------------------------------------------------------------------------
4. transfer files
We usually transfer configuration files to/usr/local/
---------------------------------------------------------------------------------------------
5. install MySQL
Start with #cd /usr/local and go to/usr/local
preinstalled server
#rpm -ivh MySQL-server-5.0.45-0.i386.rpm
Then install the client.
#rpm -ivh MySQL-client-5.0.45-0.i386.rpm
There are also other shared,devel,bench, etc. to install
#rpm -ivh MySQL-shared-5.0.45-0.i386.rpm
#rpm -ivh MySQL- devel -5.0.45-0.i386.rpm
#rpm -ivh MySQL-bench-5.0.45-0.i386.rpm
After installation, try to see if it works.
#mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 27651 to server version: 4.0.20-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
then use
show databases ;
Success!
Finally, add password to mysql
#mysqladmin -uroot password 123456
(Enter MySQL with #mysql -uroot -p123456 )
-----------------------------------------------------------------------------------------------------------------------
6. Install Install APAHCHE2
#tar zxvf httpd-2.0.50.tar.gz
#cd httpd-2.0.50
#./ configure --prefix=/usr/local/apache2 --enable-module=so
#make
#make install
After installation #/usr/local/apache2/bin/apachectl start Open it, and then use the browser to check whether the installation is successful (input IP)
----------------------------------------------------------------------------------------------------------------------------------------
7. Install PHP5
#tar zxvf php-5.0.0.tar.gz
#cd php-5.0.0
# ./ configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --enable-trace-vars -with-mysql=/var/lib/mysql
#make
#mak install
-------------------------------------------------------------------------------------------------------------------------------
8. configured
Copy the PHP.INI file to the correct location
Run in PHP directory
#cd php-5.0.0
#cp php.ini-dist /usr/local/php/lib/php.ini
Edit the apache configuration file httpd.conf
#vim /usr/local/apache2/conf/httpd.conf
the following changes should be made:
Usually add a line under #AddType application/x-tar .tgz
#LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
If you search elsewhere and there is no such line
LoadModule php5_module modules/libphp5.so
Please remove the #from the top
find
DirectoryIndex index.html index.html.var
Add index.php at the end
Let it use index.php as the default page
find
# don't use Group #-1 on these systems!
Change the user name and group below to
User apache
Group apache
(Usually nobody)
find
#ServerName
Remove #and change IP to your IP.
find
DocumentRoot "/usr/local/apache2/htdocs"
Change/usr/local/apache2/htdocs to the path where you store web files
For example, if you change to/home/easy directory, then you upload PHP files in the/home/easy directory, and then use IP access, you can see the home page
(We usually don't change it, just store the php file in/usr/local/apache2/htdocs/directory)
In order to make Chinese web pages free of garbled characters
find
AddDefaultCharset iso8859-1
Replace iso8859-1 with gb2312
For other apache2 optimizations, see the apache configuration category at http://www.phpv.net/
Save the httpd.conf file.
----------------------------------------------------------------------------------------------------------------
9 Client installation
tar zxvf phpMyAdmin-2.6.1-rc1.tar.gz
mv phpMyAdmin-2.6.1-rc1 phpmyadmin
mv phpmyadmin /usr/local/apache2/htdocs
http://IP/ .... (Enter IP Test)
------------------------------------------------------------------------------------------------------------------
10. start
# /usr/local/apache2/bin/apachectl start
If there is no error, write a test page and put it in your web directory. Mine is/usr/local/apache2/htdocs mentioned above.
#vi /home/easy/index.php
save the. Try typing IP in the tester and you can see the PHPINFO page.
If the following appears: "The $cfg[\'PmaAbsoluteUri\'] directive must be set in your configuration file.... "Well, then,
#cd /usr/local/apache2/htdocs/phpmyadmin
Modify with command # vim config.inc.php
Set $cfg ['PmaAbsoluteUri '] to http://localhost/phpmyadmin. or http://IP/phpmyadmin. This is the IP/phpmyadmin of the virtual machine
At the same time, it is also here to modify the password, home page, etc.!
Every time the installation completes a step of configuration, do a test!
After reading the above content, do you know how to configure CENTOS system? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.