In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This paper gives an example of the method of building php running environment under Ubuntu server. Share with you for your reference, the details are as follows:
Install Apache2:
Sudo apt-get install apache2
Install the PHP module:
Sudo apt-get install php5
Install Mysql
Sudo apt-get installmysql-server
Installation of other modules:
Sudo apt-get installlibapache2-mod- php5sudo apt-get installlibapache2-mod-auth-mysqlsudo apt-get installphp5-mysqlsudo apt-get installphp5- gd
The first two are easy to understand. For apache to be able to parse PHP, you need these two modules to find php engine. The third one is used by php when operating with mysql databases. Most people have database programming experience, so there is no need to explain this. The fourth GD library.
1.apache root directory
After installing apache2, the root directory is under / var/www. You can test whether it works by http://localhost/. Of course, you can also create a new file test.html in this directory to try http://localhost/test.html.
two。 Change the default directory of apache2 to the current development directory
The default directory for apache2 is configured in the / etc/apache2/sites-enabled/00default file.
Find the DocumentRoot entry in this file and change / var/www to your development directory and OK.
Of course, another way is not to change the default directory, but to set up a link to your directory under var/www. For example, if your directory is in / home/username/phptest, then you just have to
Sudo ln-s/home/username/phptest / var/www/phptest
This allows you to access your working directory through http://localhost/phptest.
3. Commands commonly used in configuration
Restart apache
Sudo / etc/init.d/apache2 restart
I hope what is described in this article will be helpful to the configuration of Ubuntu server.
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.