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--
This article mainly explains "how to install and configure LAMP on openSUSE". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to install and configure LAMP on openSUSE.
The steps to install and configure LAMP on openSUSE are as follows:
LAMP is composed of Apache MySQL PHP and is one of the software combinations under Linux. At present, there are many websites running on LAMP servers on the Internet.
Linux-is an interesting open source operating system; Apache-the planet's master WEB server; MySQL-your favorite open source database software; PHP-the popular WEB programming language.
The easiest way to install the LAMP service is to install it in the YaST graphical interface by following these steps:
1. Computer-YaST-Install Software-Select transition "Patterns", then select and accept "Web and LAMP". But in this way, we install unwanted services, such as DNS,Perl modules.
I like to install a LAMP service manually.
So don't waste time, let's get LAMP running on your openSUSE right away. I used openSUSE11.0, and this installation process is also applicable to earlier versions 10.3,10.2 and 11.1.
Install and configure the Apache2 service
Install the Apache server
Opensuse11:~#yast2-install apache2
The Apache service is installed and verified with the following code:
Opensuse11:~ # rcapache2 status
Checking for httpd2: unused
This tells us that the Apache service is installed, but not yet running. To test whether Apache is working properly, create an index.html file in the / srv/www/htdocs/ directory. This directory is the default Apache site root directory.
Opensuse11:~ # cd / srv/www/htdocs
Opensuse11:~ # vi index.html
Type the text "Welcome to openSUSE 11.1" on it.
Start the Apache2 service
Now start the Apache2 service and let's see if it works properly.
Opensuse11:~ # rcapache2 start
Starting httpd2 (prefork) done
Now open a browser such as Firefox, type http://localhost, and now you can see the text you just typed. Let's install PHP5.
Install PHP5
Opensuse11:~ # yast2-install php5 php5-mysql apache2-mod_php5
This will install the PHP5, PHP5-MySQL module and Apache2 PHP5 module. In order for Apache2 to support the PHP5 module, restart Apache2 now for the changes to take effect.
Opensuse11:~ # rcapache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) done
Install and configure MySQL
Opensuse11:~ # yast2-install mysql mysql-tools
This installs the MySQL database and optionally installed mysql-tools (setup tool) on openSUSE. Press the following command to verify that it is installed:
Opensuse11:~ # rcmysql status
Checking for service MySQL: unused
The above output shows that the MySQL service is installed, but not yet running.
Start the MySQL service
Opensuse11:~ # rcmysql start
Starting service MySQL done
The default installation does not have a root password, but the root password is very important.
Set root password
Opensuse11:~ # mysqladmin-u root-p password rootpassword
This is setting the root password to "rootpassword". You can set a secure and appropriate password.
Follow these steps to check that the root password has been set and that MySQL Client can log in to the MySQL server.
Opensuse11:~ # mysql-u root-p
Enter password:
Welcome to the MySQL monitor. Commands end with; or\ g.
Your MySQL connection id is 1
Server version: 5.0.51a SUSE MySQL RPM
Type 'help;' or'\ h' for help. Type'\ c'to clear the buffer.
Mysql > show databases
+-+
| | Database |
+-+
| | information_schema |
| | mysql |
| | test |
+-+
3 rows in set (0.04 sec)
Mysql >
As I did above, I logged in with MySQL Client as root, entered the password I just typed, and enumerated the database. This completely installs the LAMP service on openSUSE.
The easiest and most popular tool to manage MySQL databases is that the installation of phpMyAdmin,phpMyAdmin requires the PHP5,Apache2 environment we have already done above, and now you can quickly install and configure phpMyAdmin.
Install phpMyAdmin
Opensuse11:~ # yast2-install phpMyAdmin
PhpMyAdmin is installed and the phpMyAdmin directory is established in / srv/www/htdocs/. Enter this directory and quickly configure phpMyAdmin with config.sample.inc.php.
Opensuse11:~ # cd / srv/www/htdocs/phpMyAdmin
Opensuse11:~ # cp config.sample.inc.php config.inc.php
Find the following statement and change it to:
$cfg ['blowfish_secret'] =' mysqladmin'
Here I set a phrase password 'mysqladmin'.
Follow the above and set the default configuration. Log in to http://localhost/phpMyAdmin to phpMyAdmin with your root account and the password you just created.
RPM install MySQL
Rpm-ivh MySQL-server-4.0.16-0.i386.rpm
Rpm-ivh MySQL-client-4.0.16-0.i386.rpm
Http://www.linux-cn.com/html/database/mysql/20070422/9875.html
Mono
Set the ASP of Mono under Apache2.2. Net
Select system-> disk partition management in the Yast2 control center, click on the tree on the left, select partition, edit, mount / mnt/Music (Music is your own name). Then in the FSTAB option, change the values of fmask and dmask to 000, which is done. It can be mounted automatically and can be read and written.
According to my experiments, there are always 403 unauthorized limit errors in building virtual directories in OpenSuse11.2 x64 system, which is related to this.
In addition, if 403 appears under Ubuntu, the following configuration file is correct. However, it should be noted that NTFS partitions cannot be chmod. So, put the Web site on the Linux partition, and then sudo chmod-R 777 MyWeb
Create a new virtual directory configuration file under / etc/apache2/config.d/: MyTrade.conf (replace MyTrade with your own virtual directory name, and the file name should end with conf)
Alias / MyTrade "/ mnt/App/MonoApp/MyWebTradeSln/MyTrade"
# MonoServerPath can be changed to specify which version of ASP.NET is hosted
# mod-mono-server1 = ASP.NET 1.1 / mod-mono-server2 = ASP.NET 2.0
# For SUSE Linux Enterprise Mono Extension, uncomment the line below:
# MonoServerPath MyTrade "/ opt/novell/mono/bin/mod-mono-server2"
# For Mono on openSUSE, uncomment the line below instead:
MonoServerPath MyTrade "/ usr/bin/mod-mono-server2"
# To obtain line numbers in stack traces you need to do two things:
# 1) Enable Debug code generation in your page by using the Debug= "true"
# page directive, or by settingin the
# application's Web.config
# 2) Uncomment the MonoDebug true directive below to enable mod_mono debugging
MonoDebug MyTrade true
# The MONO_IOMAP environment variable can be configured to provide platform abstraction
# for file access in Linux. Valid values for MONO_IOMAP are:
# case
# drive
# all
# Uncomment the line below to alter file access behavior for the configured application
MonoSetEnv MyTrade MONO_IOMAP=all
# Additional environtment variables can be set for this server instance using
# the MonoSetEnv directive. MonoSetEnv takes a string of 'name=value' pairs
# separated by semicolons. For instance, to enable platform abstraction * and*
# use Mono's old regular expression interpreter (which is slower, but has a
# shorter setup time), uncomment the line below instead:
# MonoSetEnv MyTrade MONO_IOMAP=all;MONO_OLD_RX=1
MonoApplications MyTrade "/ MyTrade:/mnt/App/MonoApp/MyWebTradeSln/MyTrade"
Options Indexes MultiViews
Allow from all
Order allow,deny
MonoSetServerAlias MyTrade
SetHandler mono
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI ". (?: gif | jpe?g | png) $" no-gzip dont-vary
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript
That's it.
Thank you for your reading, the above is the content of "how to install and configure LAMP on openSUSE". After the study of this article, I believe you have a deeper understanding of how to install and configure LAMP on openSUSE. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.