How to Self Host Images and Photos with Ubuntu VPS

How to Self Host Images and Photos with Ubuntu VPS - Hallo sahabat Very Cheap Webhosting Reviews, Pada Artikel yang anda baca kali ini dengan judul How to Self Host Images and Photos with Ubuntu VPS, kami telah mempersiapkan artikel ini dengan baik untuk anda baca dan ambil informasi didalamnya. mudah-mudahan isi postingan yang kami tulis ini dapat anda pahami. baiklah, selamat membaca.

Judul : How to Self Host Images and Photos with Ubuntu VPS
link : How to Self Host Images and Photos with Ubuntu VPS

Baca juga


How to Self Host Images and Photos with Ubuntu VPS

lowendtutorial

Hobbyists who look to have maximum control over the image files that they host online may look into purchasing a virtual private server. If you are looking for an alternative to Flickr, a VPS could be the perfect alternative.

Several applications exist that will help you self-host your own images. Some are more basic than others; for example, you may wish to have the ability to mark photos as private or password protect specific areas of the site.

In this article, we'll detail the command line installation instructions of Lychee, an open source app that is used for hosting images on virtual private servers. These install instructions will help you install Lychee on an Ubuntu 16.04 server. Use commands with sudo when needed.

Prerequisites:

Run updates:

> sudo apt-get update
  

Install LAMP
Go ahead and install Apache, PHP and MySQL using these commands:

> sudo apt-get install apache2
  > sudo apt-get install php
  
  > sudo apt-get install mysql-server
  
  > sudo apt install php libapache2-mod-php
  

If you are asked to create a username and password for MySQL, make a note of this as you'll need it later.

To configure Lychee, we need make sure that the following list of extensions is enabled in our PHP build:

  • session
  • exif
  • mbstring
  • gd
  • mysqli
  • json
  • zip

To see what extensions are pre-enabled on your box, type this command:

> sudo php –m
  

In my test, my VPS was missing mbstring, gd, mysqli and zip. Let's get these enabled.

I ran:

sudo apt-get install php-cli php-gd php-mysqlnd php-curl php-json php-zip php-mbstring
  

For good measure, let's restart apache.

> sudo service apache2 restart
  

Let's confirm that the extensions are enabled

> sudo php –m

According to my output, all of the prerequisites now seem to be installed. If you are missing some of the other prerequisites, you might have to do some Googling to get the exact command you need.
Now we must adjust the PHP.ini file in order for Lychee to work properly. Use the following command:

> nano /etc/php/7.0/apache2/php.ini
  

You'll want to find the following lines and change it to these settings:

max_execution_time = 200
  
  post_max_size = 100M
  
  upload_max_size = 100M
  
  upload_max_filesize = 20M
  
  memory_limit = 256M
  

Hint, you'll be able to use CTRL+W to find these terms in Nano editor. You'll simply find these values and change them and save the PHP.ini file.

Hit CTRL+O to save and select yes. You'll want to hit CTRL+X to exit. It's a good idea to reload Apache using the command we used previously to do so.

From here, we can clone the Lychee files onto the VPS. Use the following sequence of commands:

> cd /var/www/html
  
  > git clone https://github.com/electerious/Lychee.git
  
  > chown -R www-data:www-data /var/www/html/Lychee

Then change the permissions of the upload directory.

> cd Lychee
  
  > sudo chmod -R 777 uploads/ data/
  

From here, let's restart Apache one more time.

> sudo service apache2 restart
  

Congrats, you've installed Lychee. Let's login to the app to continue configuring your new photo sharing application self-hosted on your VPS.

In your browser, go to http://<IPADDRESS>/Lychee

You'll be asked for a server name, database username, database password and database name. If you've followed these instructions, you should simply enter in the database username and password that you created in a previous step and leave the rest of the fields blank.

Once this is complete, you'll be able to create an administrative username and password for the Lychee app.

Now that the application setup is complete, you can begin uploading your photos onto your privately administrated virtual private server. For more information about Lychee, visit the project's page on GitHub.





Demikianlah Artikel How to Self Host Images and Photos with Ubuntu VPS

Sekianlah artikel How to Self Host Images and Photos with Ubuntu VPS kali ini, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sampai jumpa di postingan artikel lainnya.

Anda sekarang membaca artikel How to Self Host Images and Photos with Ubuntu VPS dengan alamat link https://verycheapwebhostingreview.blogspot.com/2016/12/how-to-self-host-images-and-photos-with.html

0 Response to "How to Self Host Images and Photos with Ubuntu VPS"

Post a Comment