search

Linux is really a pain for a novice sometimes. . . Changing the wrong configuration file without backing it up may take a whole morning or a whole day. I once reinstalled mysql+php+Apache in my virtual machine due to a mistake in installing memcached. When configuring the server before, I had to mount additional disks. I spent several hours doing this, but for some unknown reason, I couldn't mount the specified directory. Due to time constraints, we couldn't let it go. Alas, if I talk too much, it’s all sad things, O(∩_∩)O~. . .

Combined with myself, I would like to give some advice to Linux novices. Make a backup before changing the configuration file, and do not change the file configuration file permissions randomly. When typing based on other people's examples, try to figure out the reason for the typing.


Our server uses Alibaba Cloud's Linux server, which was previously installed using a one-click installation script (a bit of cutting corners and creating backdoors). . . I encountered some problems in the later stage. Let me summarize them based on the problems.


Detailed description of first-level directory


Start website directory (phpinfo, nginx_info): /www/web/default

Trash: /www/trash

Default website directory: /www/default/public_html

mysql database backup directory:/www/backup/mysql

Backend settings web_log:/www/web_logs

Software installation location:/www/wdlinux


/www/wdlinuxSecondary directory description


pureftpd: PureFTPd is a free FTP server software that focuses on program robustness and software security

init.d:/www/wdlinux/init.d: ​​script used by wdcp to control application startup

/www/wdlinux/wdcp_bk: wdcp backup system configuration file

/www/wdlinux/httpd-2.2.24:http main program of Apache server

/www/wdlinux/etc: A place for various configuration files, including soft links

/www/wdlinux/tmp: wdcp temporary directory

apache_php-5.3.27: php and Apache

/www/wdlinux/nginx_php-5.3.27: nginx and php

/www/wdlinux/wdapache: Apache main file

/www/wdlinux/tools: wdcp various shell script tools

/www/wdlinux/wdphp:php file


Detailed description of each application

nginx


nginx info (website default entry file) file:/www/web/default/nima.php

nginx configuration file directory:/www/wdlinux/nginx-1.2.9/conf/ngin.conf

nginx rewrite configuration file:/www/wdlinux/nginx-1.2.9/conf/rewrite

nginx error/operation log:/www/wdlinux/nginx-1.2.9/logs

nginx start/restart/stop operations:

/www/wdlinux/nginx-1.2.9/sbin/nginx -c /www/wdlinux/nginx-1.2.9/conf/ngin.conf

/www/wdlinux/nginx-1.2.9/sbin/nginx -s reload

/www/wdlinux/nginx-1.2.9/sbin/nginx -s stop

nginx checks whether the default configuration file is normal

/www/wdlinux/nginx-1.2.9/sbin/nginx -t


Apache


httpd: httpd is the main program of ApacheHTTP server

/www/wdlinux/wdapache/logs: Apache log files

/www/wdlinux/wdapache/bin: Various Apache commands

Apache/Start/Restart/Stop

/www/wdlinux/wdapache/bin/httpd start Start

/www/wdlinux/wdapache/bin/httpd restart Restart

/www/wdlinux/wdapache/bin/httpd httpd stop stop service


mysql

mysql directory:/www/wdlinux/mysql-5.1.69

mysql start/restart/stop

/www/wdlinux/mysql-5.1.69/libexec/mysqld start

/www/wdlinux/mysql-5.1.69/libexec/mysqld restart

/www/wdlinux/mysql-5.1.69/libexec/mysqld stop


Linux common information explanation (extract, there are many online so I won’t list them all)

.o, is the target file, equivalent to the .obj file in windows

.so is a shared library, a shared object, used for dynamic linking, similar to dll

.a is a static library, which is several .o put together for static connection.

.la is some shared libraries automatically generated by libtool, which can be edited and viewed by vi. It mainly records some configuration information. You can use the following command to view

/bin Binary executable command

/dev device special files

/etc system management and configuration files

/etc/rc.d startup configuration files and scripts

/home is the base point of the user's home directory. For example, the home directory of user user is /home/user, which can be represented by ~user.

/lib standard programming library, also called dynamic link shared library, functions similar to .dll files in windows

/sbin super management command, which stores the management programs used by system administrators

/tmp public temporary file storage point

/root system administrator’s home directory

/mnt The system provides this directory to allow users to temporarily mount other file systems.

The directory /lost+found is usually empty. The system shuts down abnormally and leaves a "homeless" file (what is it called .chk in Windows) right here?

/proc virtual directory is a mapping of system memory. This directory can be accessed directly to obtain system information.

/var is the overflow area of ​​certain large files, such as log files of various services.

/usr is the largest directory. Almost all the applications and files to be used are in this directory.



The above introduces the detailed description of wdcp, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Continued Use of PHP: Reasons for Its EnduranceThe Continued Use of PHP: Reasons for Its EnduranceApr 19, 2025 am 12:23 AM

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

PHP and Python: Exploring Their Similarities and DifferencesPHP and Python: Exploring Their Similarities and DifferencesApr 19, 2025 am 12:21 AM

PHP and Python are both high-level programming languages ​​that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP and Python: Different Paradigms ExplainedPHP and Python: Different Paradigms ExplainedApr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python: A Deep Dive into Their HistoryPHP and Python: A Deep Dive into Their HistoryApr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Choosing Between PHP and Python: A GuideChoosing Between PHP and Python: A GuideApr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP and Frameworks: Modernizing the LanguagePHP and Frameworks: Modernizing the LanguageApr 18, 2025 am 12:14 AM

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHP's Impact: Web Development and BeyondPHP's Impact: Web Development and BeyondApr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.