In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
In this article Xiaobian for you to introduce in detail "how to install Apache and Mysql in CentOS6", the content is detailed, the steps are clear, the details are handled properly, I hope this "how to install Apache and Mysql in CentOS6" article can help you solve your doubts, following the editor's ideas slowly in depth, together to learn new knowledge.
1. Install apache
Enter the following command in the terminal to install apache:
Sudo yum install httpd
Sudo means what to do with root users. To click y to confirm the download and installation, very convenient.
Then start the service with the following command
Sudo service httpd start
There is no need to rush down now, just type the ip address given to you by digitalocean in the browser, and you should be able to access the welcome page of apache. It looks like the following:
Isn't that cool? If your domain name has been successfully resolved to the ip address of your host, it should also be accessible with your domain name!
two。 Install mysql
Sudo yum install mysql-serversudo service mysqld start
You can download and install mysql with the above command, and the second is to start the mysql service.
Install mysql will ask you some simple configuration, press enter first, the latter is actually very simple in English, according to your own needs to choose.
Disallow root login remotely? There is such an option, whether to allow mysql root users to access remotely, I chose no, can access, this is more convenient, but there are security risks. In this way, the later software can also use the database in this vps.
3. Install php and php components
Sudo yum install php php-mysql
Use the above command to download and install php. The more troublesome are the components of php.
Yum install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
I have simply installed seven components here, and you can also search for all the php components with the following command
Yum search php-
4. Apache and mysql services are started by default when booting
Sudo chkconfig httpd onsudo chkconfig mysqld on
You can use the above two commands to choose to boot apache and mysql.
5. Test whether php is installed successfully
Sudo nano / var/www/html/info.php
You can use the above command to create a new info.php file, nano is a simple text editing tool, and vim.
Enter a simple test php command:
Then type ctrl o to save, and click enter to confirm. Then type ctrl x to exit.
Then in the browser, enter the ip address plus info.php, and you can see the information of php! Similar to the following figure:
Read here, this "how to install Apache and Mysql in CentOS6" article has been introduced, want to master the knowledge of this article also need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.
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.