एंड्रॉयड

7 पर अपाचे के साथ वर्डप्रेस कैसे स्थापित करें 7

टीवी अपाचे RTR 160 4v तारों विवरण और टीसीआई जैक

टीवी अपाचे RTR 160 4v तारों विवरण और टीसीआई जैक

विषयसूची:

Anonim

वर्डप्रेस दुनिया भर में सबसे लोकप्रिय ओपन सोर्स ब्लॉगिंग और सीएमएस प्लेटफॉर्म है, जो आज इंटरनेट पर सभी वेबसाइटों का एक चौथाई हिस्सा है। यह PHP और MySQL पर आधारित है और एक टन सुविधाओं को पैक करता है जिसे मुफ्त और प्रीमियम प्लगइन्स और थीम के साथ बढ़ाया जा सकता है। वर्डप्रेस आपके ऑनलाइन स्टोर, वेबसाइट, या ब्लॉग बनाने का सबसे सरल तरीका है।

इस ट्यूटोरियल में, हम समझाएंगे कि कैसे वर्डप्रेस को सेंटोस 7 पर स्थापित किया जाए। इस लेख को लिखने के समय, वर्डप्रेस का नवीनतम संस्करण 5.0.3 है।

हम वेब सर्वर, एसएसएल प्रमाणपत्र, नवीनतम PHP 7.2 और MySQL / MariaDB डेटाबेस सर्वर के रूप में Apache के साथ LAMP स्टैक का उपयोग करेंगे।

आवश्यक शर्तें

इस ट्यूटोरियल के साथ जारी रखने से पहले निम्नलिखित आवश्यक शर्तें पूरी करें:

  • एक डोमेन नाम आपके सर्वर सार्वजनिक आईपी पते की ओर इशारा करता है। हम example.com का उपयोग करेंगे। sudo विशेषाधिकार के साथ एक उपयोगकर्ता के रूप में जाना जाता है। इन निर्देशों का पालन करके इंस्टॉल किया गया है। इन निर्देशों का पालन करके स्थापित.HP 7.2। आपके पास अपने डोमेन के लिए एक SSL प्रमाणपत्र स्थापित है। आप इन निर्देशों का पालन करके एक निशुल्क लेट एनक्रिप्ट एसएसएल सर्टिफिकेट जनरेट कर सकते हैं।

MySQL डाटाबेस बनाना

वर्डप्रेस एक MySQL डेटाबेस में अपने डेटा और कॉन्फ़िगरेशन को संग्रहीत करता है। यदि आपके पास पहले से MySQL या MariaDB आपके CentOS सर्वर पर स्थापित नहीं है, तो आप नीचे दिए गए किसी एक गाइड का अनुसरण करके स्थापित कर सकते हैं:

  • CentOS 7 पर MySQL को CentOS 7.Install MariaDB पर स्थापित करें।

निम्नलिखित कमांड निष्पादित करके MySQL शेल में लॉगिन करें:

mysql -u root -p

MySQL शेल के भीतर, wordpress नामक एक नया डेटाबेस बनाने के लिए निम्न एसक्यूएल स्टेटमेंट चलाएं:

CREATE DATABASE wordpress CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

इसके बाद, wordpressuser नाम से एक MySQL उपयोगकर्ता खाता बनाएं और निम्नलिखित कमांड को चलाकर उपयोगकर्ता को आवश्यक अनुमतियां प्रदान करें:

GRANT ALL ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'change-with-strong-password';

एक बार करने के बाद, टाइप करके mysql कंसोल से बाहर निकलें:

EXIT;

वर्डप्रेस डाउनलोड करना

निम्नलिखित कमांड वर्डप्रेस डाउनलोड पृष्ठ से वर्डप्रेस के नवीनतम संस्करण को wget के साथ डाउनलोड करेगा और संग्रह को डोमेन के दस्तावेज़ रूट निर्देशिका में निकालेगा:

wget -q -O - "http://wordpress.org/latest.tar.gz" | sudo tar -xzf - -C /var/www/html --transform s/wordpress/example.com/

सही अनुमतियाँ सेट करें ताकि वेब सर्वर को साइट की फ़ाइलों और निर्देशिकाओं तक पूरी पहुंच मिल सके:

sudo chown -R apache: /var/www/html/example.com

अपाचे को कॉन्फ़िगर करना

अब तक, आपके पास पहले से ही अपने सिस्टम पर एसएसएल सर्टिफिकेट के साथ अपाचे होना चाहिए, अगर इस ट्यूटोरियल के लिए आवश्यक शर्तें न देखें।

अपना टेक्स्ट एडिटर खोलें और डोमेन के अपाचे वर्चुअल होस्ट कॉन्फ़िगरेशन को संपादित करें:

sudo nano /etc/httpd/conf.d/example.com.conf

example.com को अपने वर्डप्रेस डोमेन से बदलना न भूलें और एसएसएल सर्टिफिकेट फाइलों के लिए सही रास्ता तय करें।

/etc/httpd/conf.d/example.com.conf

ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ ServerName example.com ServerAlias www.example.com Redirect permanent / https://example.com/ DirectoryIndex index.html index.php DocumentRoot /var/www/html/example.com ErrorLog /var/log/httpd/example.com-error.log CustomLog /var/log/httpd/example.com-access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem Options FollowSymLinks AllowOverride All Require all granted

कॉन्फ़िगरेशन Apache को आपके डोमेन के non-www संस्करण में http और https और www पर पुनर्निर्देशित करेगा।

परिवर्तनों को प्रभावी करने के लिए Apache सेवा को पुनरारंभ करें:

sudo systemctl restart

वर्डप्रेस इंस्टॉलेशन को पूरा करना

अब जब Wordpress डाउनलोड हो गया है और Apache सर्वर कॉन्फ़िगर हो गया है, तो आप वेब इंटरफेस के माध्यम से इंस्टॉलेशन को पूरा कर सकते हैं।

अपना ब्राउज़र खोलें, अपना डोमेन लिखें और निम्न के समान एक स्क्रीन दिखाई देगी:

यहां से आप नए थीम और प्लगइन्स इंस्टॉल करके अपने वर्डप्रेस इंस्टॉलेशन को कस्टमाइज़ करना शुरू कर सकते हैं।

निष्कर्ष

बधाई हो, आपने अपने CentOS 7 सर्वर पर Apache के साथ सफलतापूर्वक WordPress स्थापित किया है। वर्डप्रेस के साथ पहला कदम वर्डप्रेस के साथ शुरुआत करने के तरीके के बारे में अधिक जानने के लिए एक अच्छी शुरुआत है।

सेंटोस वर्डप्रेस mysql mariadb cms apache