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 > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to install Apache, PHP, MySQL and Tomcat under FreeBSD". In daily operation, I believe many people have doubts about how to install Apache, PHP, MySQL and Tomcat under FreeBSD. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the questions of "how to install Apache, PHP, MySQL and Tomcat under FreeBSD". Next, please follow the editor to study!
I have had the experience of installing Apache+PHP+MySQL under linux before. I have installed FreeBSD these days. I want to install a database below. Of course, MySQL is the first choice. This is simple.
1.MySQL
Found / usr/ports/databases/mysql50-server
Cd / usr/ports/databases/mysql50-server
Make install clean
The subsequent database did not generate
User mysql:mysql needs to be added
Run mysql_install_db
You will find that the mysql directory is generated under / var/db, which is the database file of mysql.
Chown-R mysql:mysql / var/db/mysql
Add mysql_enable= "YES" to rc.conf
/ usr/local/etc/rc.d/mysql-server.sh-start
If there are no errors, mysql will run
Install this, of course, hang up a server test.
2.Apache
Cd / usr/ports/www/apache20/
There used to be a parameter-enable-so when downloading linux.
I added it to Makefile. I don't know if it's necessary, but I installed it later.
Make install clean
Installation succeeded
Modify the configuration file httpd.conf
Add apache2_enable= "YES" to rc.conf
/ usr/local/etc/rc.d/apache2.sh start
If the startup is successful, it will be fine.
3.PHP
Cd / usr/ports/www/mod_php5
Make install clean
Just select the with apache or something during installation.
After installation, remove the # of loadmodule in httpd.conf from the last php just added.
Add .php .phps to the Addtype line
Just write a phpinfo () to test it
4.PHP+MySQL
There is no mysql support when installing mod_php5.
Cd / usr/ports/databases/php5-mysql
Make install clean is fine.
That's it, Apache+PHP+MySQL.
5. Install Tomcat
Before I installed jdk-1.4.2, I installed unset JAVA_HOME before Tomcat.
Cd / usr/ports/www/jakarta-tomcat5
Make install clean is fine.
/ usr/local/bin/tomcat50ctl start
Http://127.0.0.1:8180/
The test passed
6.Tomcat+MySQL
Go to the next connector on mysql's official website and put the corresponding jar file in the
Under the corresponding directory of tomcat
7.Apache + Tomcat
I installed mod_jk2-apache2 at the beginning.
As a result, it didn't succeed. I installed mod_jk-apache2 again, and it didn't succeed either.
Later, I remembered that I had succeeded under windows. I went to have a look and found that I used mod_jk2.
I can't help it. I went back to install mod_jk2-apache2.
Enable the row in httpd.conf that loads mod_jk2
Then I copied the workers2.properties file under windows to
Under / usr/local/etc/apache2, only one modification has been made
The following is the revised version:
[shm]
Info=Scoreboard. Requried for reconfiguration and
Status with multiprocess servers.
File=/var/log/shm.file
Size=1048576
# Defines a load balancer named lb.
Use even if you only have one machine.
[lb]
# Example socket channel, override port and host.
[channel.socket]
Port=8009
Host=localhost
# define the worker
[ajp13]
Channel=channel.socket:localhost:8009
Group=lb
# Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
Group=lb
[uri:/admin/*]
Group=lb
[status:]
Info=Status worker, displays runtime information
[uri:/jkstatus/*]
Info=The Tomcat / jkstatus handler
Group=status:
[uri:/*.jsp]
Worker=ajp13:localhost:8009
Then touch / var/log/shm.file creates the shm.file
Chown-R www:www var/log/shm.file
Then restart Apache and Tomcat
At this point, the study on "how to install Apache, PHP, MySQL and Tomcat under FreeBSD" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.