Install the Certbot utility: sudo yum -y install yum-utils Sudo firewall-cmd -permanent -add-service=httpsĪpply for a Let's Encrypt SSL certificate Sudo firewall-cmd -permanent -add-service=http You can confirm the results, as well: hostnameīlock inbound traffic on port 9000 and allow inbound traffic on ports for HTTP and HTTPS services: sudo firewall-cmd -permanent -remove-port=9000/tcp ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 Next, setup the hostname and FQDN as follows: sudo hostnamectl set-hostname leanoteġ27.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 Properly setup a hostname and fully qualified domain name (FQDN)īefore you can obtain the Let's Encrypt SSL certificate, you need to properly setup the hostname and FQDN on your machine.įirst, press CTRL+ C to stop the Leanote script run.sh. In order to improve system security, you can enable HTTPS by deploying both a Let's Encrypt SSL certificate and the Nginx reverse proxy on your machine. Step 8: Enable HTTPS accessįor now, you can already access the Leanote server using the HTTP protocol, a less secure protocol. Use the default Leanote admin account to sign in:įor security purposes, you should change the default password immediately after signing in. 0.0.0.0:9000, point your favorite web browser to to start using the Leanote site. Start Leanote using the official script: cd /home/leanote/leanote/bin Modify firewall rules in order to allow inbound TCP traffic on port 9000: sudo firewall-cmd -permanent -add-port=9000/tcp Make sure to replace the value E52t圜DBRk39HmhdGYJLBS3etXpnz7DymmxkgHBYxd7Y9muWVVJ5QZNdDEaHV2sA with your own 64-bit random value. Note: For security purposes, the value of the app.secret parameter MUST be a 64-bit random string that is different from the original one. Replace them, respectively, as shown below: site.url=Īpp.secret=E52t圜DBRk39HmhdGYJLBS3etXpnz7DymmxkgHBYxd7Y9muWVVJ5QZNdDEaHV2sA ![]() Use the vi editor to open the Leanote config file: vi app.confįind the following lines one by one: site.url= db.username= # if not exists, please leave it blankĭb.password= # if not exists, please leave it blankĪpp.secret=V85ZzBeTnzpsHyjQX4zukbQ8qqtju9y2aDM55VWxAH9Qop19poekx3xkcDVvrD0y Step 6: Configure Leanoteīackup the Leanote config file /home/leanote/leanote/conf/app.conf: cd /home/leanote/leanote/conf/ Restart the MongoDB service in order for the modifications to take effect: sudo systemctl restart rviceįrom now on, you can only use the two user accounts to access and manage MongoDB, useradmin for managing all MongoDB users and leanoteadmin for managing the leanote database only. Sudo bash -c "echo ' authorization: enabled' > /etc/nf" Setup the MongoDB 4.0 YUM repoĬreate the MongoDB 4.0 YUM repo as follows: cat > /etc/nf" Step 3: Install MongoDB Community Edition 4.0Īs required by Leanote, the MongoDB NoSQL DBMS has to be in place before you can successfully setup a Leanote server. Step 2: Obtain Leanote 2.6.1 binary filesĭownload and extract the latest stable release of Leanote for 64-bit Linux system: cd Note: If you are using a different server size, you may need to modify the size of the swap file. sudo dd if=/dev/zero of=/swapfile count=2048 bs=1MĮcho '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab For example, creating a 2048MB-sized swap file is fit for a machine with 2GB of memory. When firing up a new Vultr CentOS 7 server instance, it's always recommended to setup a swap file in order to ensure the system is running smoothly. A domain being pointed to the server instance mentioned above.All of the software packages on the machine have been updated to the latest stable status using the EPEL YUM repo. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |