Install lamp on fedora 10
If you see this page, then your web server is now correctly installed and accessible through your firewall. Usually, this is the address you use to connect to your server through SSH. There are a few different ways to do this from the command line. First, you could use the iproute2 tools to get your IP address by typing this:. This will give you two or three lines back. They are all correct addresses, but your computer may only be able to use one of them, so feel free to try each one.
An alternative method is to use the curl utility to contact an outside party to tell you how it sees your server. This is done by asking a specific server what your IP address is:.
Now that you have a web server up and running, you need to install the database system to be able to store and manage data for your site. In Debian 10, the metapackage mysql-server , which was traditionally used to install the MySQL server, was replaced by default-mysql-server. This script will remove some insecure default settings and lock down access to your database system.
Start the interactive script by running:. This script will take you through a series of prompts where you can make some changes to your MariaDB setup.
The first prompt will ask you to enter the current database root password. This is not to be confused with the system root. The database root user is an administrative user with full privileges over the database system. This will remove anonymous users and the test database, disable remote root login, and load these new rules so that MariaDB immediately respects the changes you have made.
This will connect to the MariaDB server as the administrative database user root , which is inferred by the use of sudo when running this command. You should see output like this:. Even though this might look like a security concern at first, it makes the database server more secure because the only users allowed to log in as the root MariaDB user are the system users with sudo privileges connecting from the console or through an application running with the same privileges.
To create a new database, run the following command from your MariaDB console:. You can test if the new user has the proper permissions by logging in to the MariaDB console again, this time using the custom user credentials:.
PHP is the component of your setup that will process code to display dynamic content. It can run scripts, connect to your MariaDB databases to get information, and hand the processed content over to your web server to display. Once again, leverage the apt system to install PHP. In addition, include some helper packages which will ensure that PHP code can run under the Apache server and talk to your MariaDB database:.
In most cases, you will want to modify the way that Apache serves files. Run the below command to install the Apache server using the DNF tool. You can install MariaDB from official yum repositories by running the following command. After completing the installation process, run the secure installation script to secure the MariaDB instance. Follow the onscreen instructions.
The default password is none. Change your root account password and Press Y for all other operations to apply improved security. PHP is the most popular programming language. You may also require some modules as per your requirements. Install the required PHP modules on your system. As per our readers comment.
To understand about FirewallD read our next tutorial. To test the installation, create a phpinfo function file under default document root directory. Now access the phpinfo. To find your system IP use the command. Next, you may like to install phpMyAdmin on your system to manage database using web interface. Is it correct to leave as root user permissions or must be apache user for this folder? PHP Hypertext Preprocessor is a popular scripting language used to build the logic for displaying web content and for users to interact with the database.
If you want to install additional PHP modules , you can search and install using the combination of apt-cache command and grep command as shown. Now open a browser and type the following address to see whether your web server can show content created by this PHP script. If you see the above page in your web browser, then your PHP installation is working as expected.
Also, this page shows some basic details about your PHP installation and it is useful for debugging purposes, but at the same time it will also show some sensitive information about your PHP. If you have questions about this article, feel free to ask in the comment section. TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! If you like what you are reading, please consider buying us a coffee or 2 as a token of appreciation.
We are thankful for your never ending support. Open the configuration config. Have a question or suggestion?
0コメント