w3.bethelministries.org

Making And Maturing Disciples of Jesus Christ For The Glory Of God.

User Tools

Site Tools


servers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
servers [2021/02/25 15:18]
johngoossen removed
— (current)
Line 1: Line 1:
-====== Servers ====== 
  
-===== Configure Networking ===== 
- 
-To configure the network, edit the network interface configuration file. To get the list of the network interfaces use the ls command. This provides the names to be used in the configuration file. 
- 
-<WRAP cli> 
-ls /sys/class/net 
-</WRAP> 
- 
-To configure the server with a static ip address edit /etc/network/interfaces 
- 
-<WRAP cli> 
-sudo nano /etc/network/interfaces 
-</WRAP> 
- 
-use the following example replacing the parts in italics with the settings for your server. 
- 
-<file config /etc/network/interfaces> 
-auto enp0s3 
-iface enp0s3 inet static 
-    address 192.168.254.1/24 
-    gateway 192.168.254.254 
-    dns-nameservers 192.168.254.254 
-    dns-search bree.itg.xyz 
-</file> 
- 
- 
-<file config /etc/network/interfaces> 
-allow-hotplug enp0s3 
-iface enp0s3 inet static 
-    address 192.168.254.1/24 
-    gateway 192.168.254.254 
-    dns-nameservers 192.168.254.254 
-    dns-search bree.itg.xyz 
-</file> 
- 
- 
-===== Setup WordPress ===== 
- 
- 
- 
-<WRAP info> 
-Note: Example site name is myblog at myblog.com and user name is myuser.\\ 
-Note: The following styles are used in this guide: 
-</WRAP> 
- 
-<WRAP cli> 
-this typeface indicates a command to be entered in the terminal 
-</WRAP> 
- 
-A \ indicates that a command continues on the next line. The following two commands are equivalents: 
- 
-<WRAP cli> 
-sudo apt update && sudo apt upgrade 
-</WRAP> 
- 
-<WRAP cli> 
-sudo apt update && \ \\ 
-sudo apt upgrade 
-</WRAP> 
- 
-<file conf name of a file to be edited> 
-and this is the contents of the file 
-⋮ ← indicates sections of file not shown 
-</file> 
- 
-==== 1. Create a database for the WordPress site. ==== 
- 
-The first step we will take is to create a database that WordPress will use to store and maintain it’s data. 
-At a terminal on the server issue the following command to launch the database management terminal with privileged access: 
- 
-<WRAP cli> 
-sudo mariadb 
-</WRAP> 
- 
-<WRAP info> 
-Note: MariaDB is a drop in replacement for MySQL. For this guide MariaDB and MySQL can be used interchangeably. 
-</WRAP> 
- 
-To create the database use the following command: 
- 
-<WRAP cli> 
-CREATE DATABASE wp_myblog DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; 
-</WRAP> 
- 
-<WRAP info> 
-Note: SQL commands end with a ; 
-</WRAP> 
- 
-Next create a MariaDB user that will be used exclusively by WordPress. Use the following command: 
- 
-<WRAP cli> 
-GRANT ALL ON wp_rick.* TO 'wp_myblog_myuser'@'localhost' IDENTIFIED BY 'secretpassword'; 
-</WRAP> 
- 
-Now you have a database and user for WordPress’ exclusive use. The following command will reload the grant tables so the MariaDB knows about the changes. 
- 
-<WRAP cli> 
-FLUSH PRIVILEGES; 
-</WRAP> 
- 
-Exit out of MariaDB by typing: 
- 
-<WRAP cli> 
-EXIT; 
-</WRAP> 
- 
-==== 2. Download and Pre-Configure WordPress ==== 
- 
-Download WordPress using wget from your home directory on the server. 
- 
-<WRAP cli> 
-wget https://wordpress.org/latest.tar.gz 
-</WRAP> 
- 
-Extract the compressed file to create the WordPress directory structure: 
- 
-<WRAP cli> 
-tar xzvf latest.tar.gz 
-</WRAP> 
- 
-On your own computer, use filezilla to copy wp-config-sample.php to your local computer. 
- 
-On your computer rename wp-config-sample.php to wp-config.php. 
- 
-Open wp-config.php for editing. 
- 
-Modify the database connection settings. You need to adjust the database name, the database user, and the associated password that you’ve configured within MariaDB. 
- 
-<file php wp-config.php (Partial File – Database section)> 
- 
- 
-define('DB_NAME', 'wp_myblog'); 
- 
-/** MySQL database username */ 
-define('DB_USER', 'wp_myblog_myuser'); 
- 
-/** MySQL database password */ 
-define('DB_PASSWORD', 'secretpassword'); 
- 
- 
-</file> 
- 
- 
-Use your browser on your computer to navigate to https://api.wordpress.org/secret-key/1.1/salt/ 
- 
-copy the results into wp-config.php, replacing the define statements under Authentication Unique Keys and Salts. 
- 
-<file php wp-config.php (Partial section BEFORE edit)> 
- 
-/**#@+ 
- * Authentication Unique Keys and Salts. 
- * 
- * Change these to different unique phrases! 
- * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} 
- * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. 
- * 
- * @since 2.6.0 
- */ 
-define( 'AUTH_KEY',         'put your unique phrase here' ); 
-define( 'SECURE_AUTH_KEY',  'put your unique phrase here' ); 
-define( 'LOGGED_IN_KEY',    'put your unique phrase here' ); 
-define( 'NONCE_KEY',        'put your unique phrase here' ); 
-define( 'AUTH_SALT',        'put your unique phrase here' ); 
-define( 'SECURE_AUTH_SALT', 'put your unique phrase here' ); 
-define( 'LOGGED_IN_SALT',   'put your unique phrase here' ); 
-define( 'NONCE_SALT',       'put your unique phrase here' ); 
- 
-/**#@-*/ 
- 
-</file> 
- 
- 
-<file php wp-config.php (Partial section AFTER edit)> 
- 
-/**#@+ 
- * Authentication Unique Keys and Salts. 
- * 
- * Change these to different unique phrases! 
- * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service} 
- * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. 
- * 
- * @since 2.6.0 
- */ 
-define('AUTH_KEY',         'h=&l4.Zfi+Gzk/feWhG2?fL=l|jRzco{h,KQK4Dsx!+vpH@N4AmPSm>:VP47Yv$j'); 
-define('SECURE_AUTH_KEY',  'E;|CQ)^!vVw.]4|@YMm)-p]Zm]KFq*2T10 >f7^|to3ZTpMMOUh?Y|x|K{;k$@|E'); 
-define('LOGGED_IN_KEY',    'SJ#DDwU>IAV6^s/tbXjZ--cL+h9|}xlbeOz E:wnIr|{]dkpL|T2Ls.oZ]ofVAsv'); 
-define('NONCE_KEY',        '-++QaRvkw-}9p@9||`hZ3EQl(,eInMJr+0[!3So&-@S|5{[Vj5GUuQFPMh.y-3F)'); 
-define('AUTH_SALT',        ')D11R(5S_hi{]sISeQNt`kPRC#yj;~H?`R_~qR(1w:Of<$NM(B2:UK$V!Yh8xYl;'); 
-define('SECURE_AUTH_SALT', 'F~QnAb;x@pvO[|}kplNi}cKHHqJ-p?#}1i}hEnN #9+zikCueBF!!snY!b~hcO#I'); 
-define('LOGGED_IN_SALT',   '9081bzSU4X^jXWvfT?-D>hL&+(n()U.D3rr{Sd{3PFf6tl:BXjlOB,p%63[40uZc'); 
-define('NONCE_SALT',       '@ZNAuqn><eO|N/55yMMu%{f+#Ux?*XB(tU*B-~)9%JKitu^~6Ja&S4@qP~nU=n:h'); 
-/**#@-*/ 
- 
-</file> 
- 
-Save and close the file when you are finished. 
- 
-Copy the file from your computer back onto the server with Filezilla. 
- 
-==== 3. Prepare the virtualhost document root Directory ==== 
- 
-Back at the server, copy the entire pre-configured wordpress folder from your home directory on the server to your virtualhost document root. The source includes a dot at the end to indicate that everything in the directory should be copied, including hidden files. 
- 
-<WRAP cli> 
-sudo cp -a ./wordpress/. /var/www/myblog.com 
-</WRAP> 
- 
-Now that WordPress is located in it’s final location we need to set the ownership and permissions for the files and folders. 
- 
-Apache2 runs as www-data, so set the ownership to that user and group. This allows Apache2 to serve the files and update them when it needs to. 
- 
-<WRAP cli> 
-sudo chown -R www-data:www-data /var/www/myblog.com 
-</WRAP> 
- 
-Change the permissions of the files and folders under /var/www/myblog.com. 
-We can use find to create a list of files or folders and chmod to apply the permissions. 
- 
-<WRAP cli> 
-sudo find /var/www/rickandsarah.us/ -type d -exec chmod 750 {} \; \\ 
-sudo find /var/www/rickandsarah.us/ -type f -exec chmod 640 {} \; 
-</WRAP> 
- 
-==== 4. Complete the Installation Through the Web Interface ==== 
- 
-Finally, you can finish installing and configuring WordPress by accessing it through the web interface. 
- 
-In your web browser, navigate to your server’s domain name or public IP address: 
- 
-http://myblog.com 
- 
-Select the language you would like to use: 
-Next, you will come to the main setup page. Select a name for your WordPress site and choose a username and password. A strong password is generated automatically. Save this password or select an alternative strong password. 
- 
-Enter your email address and select whether you want to discourage search engines from indexing your site: 
- 
-When ready, click the Install WordPress button. You’ll be taken to a page that prompts you to log in: 
- 
-Once you log in, you will be taken to the WordPress administration dashboard: 
- 
-From the dashboard, you can begin making changes to your site’s theme and publishing content. 
- 
-==== Conclusion ==== 
- 
-WordPress is now installed and ready to use. Some things you might want to consider: 
-  * Go over the settings and verify they are set to what you want. 
-    * In Discussion, you might want to specify that a user must be registered and logged in in order to comment. 
-    * Under Reading you can set what to show on the home page. 
-    * Configure Permalinks (the persistent path part of the url). 
-    * Setup a privacy page explaining your privacy policies. 
-  * Change the Appearance with themes 
-  * Install plugins (such as All-in-One WP Migration) 
-  * Check out the First Steps with WordPress guide: https://wordpress.org/support/article/first-steps-with-wordpress-classic/ 
servers.1614287886.txt.gz · Last modified: 2021/02/25 15:18 by johngoossen