• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Cloud

Install AWS CLI on Ubuntu

April 24, 2017

The advantage of running Amazon Linux on AWS is that you already have the AWS CLI (command line interface) loaded as part of the image. In addition, Amazon Linux has rolling updates. It means you don’t have to perform major upgrades as you go to from one version to another. It’s all part of the process when you perform periodical updates. However, if you’re running Ubuntu, it’s no slouch. It’s a popular distro which many administrators have chosen to use due to its simplicity and robust repository. So, if you’re running Ubuntu, you might want to install the AWS CLI to give you the tools you need similar to what Amazon Linux has. Here’s how to install AWS CLI on Ubuntu.

$ sudo apt install awscli

$ sudo apt install awscli

You will need to run the configuration before you can start using AWS CLI. See example below.

$ sudo aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json

$ sudo aws configure AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Default region name [None]: us-west-2 Default output format [None]: json

Obviously, you will need your own Access Key and Secret Key that you’ll need to generate from your AWS Console under IAM.

Filed Under: Cloud, Linux Tagged With: aws cli, ubuntu

NextCloud Install

March 23, 2017

NextCloud is an open-source next-generation file sharing and file synching web-application that you can run and install on your own Linux server. It’s similar to Dropbox, the file-sharing cloud application. The big difference between Dropbox and NextCloud is that you get to run your own cloud storage on your own server. The following are instructions on how to install NextCloud on an Ubuntu Server 16.04 LTS server.

Run Updates First

$ sudo apt-get update
$ sudo apt-get upgrade -y
$ sudo apt-get dist-upgrade -y

$ sudo apt-get update $ sudo apt-get upgrade -y $ sudo apt-get dist-upgrade -y

Install Apache

$ sudo apt-get install apache2

$ sudo apt-get install apache2

Install MySQL Server

$ sudo apt-get install mysql-server mysql-client
$ sudo mysql_secure_installation

$ sudo apt-get install mysql-server mysql-client $ sudo mysql_secure_installation

Install PHP

$ sudo apt-get install php libapache2-mod-php php-mbstring php-zip php-xml php-mysql php-gd
$ sudo apt-get install php-json php-curl php-intl php-mcrypt php-imagick php-dom unzip

$ sudo apt-get install php libapache2-mod-php php-mbstring php-zip php-xml php-mysql php-gd $ sudo apt-get install php-json php-curl php-intl php-mcrypt php-imagick php-dom unzip

Edit php.ini change the memory limit and upload and post file sizes to something bigger. Restart Apache.

$ sudo nano /etc/php/7.0/apache2/php.ini
memory_limit = 512M
upload_max_filesize = 500M
post_max_size = 500M
$ sudo service apache2 restart

$ sudo nano /etc/php/7.0/apache2/php.ini memory_limit = 512M upload_max_filesize = 500M post_max_size = 500M $ sudo service apache2 restart

Create Database and User. Flush privileges.

$ mysql -u root -p
mysql> create database nextcloud;
mysql> grant all privileges on nextcloud.* to 'ncuser'@'localhost' identified by 'password';
mysql> flush privileges;
mysql> exit;

$ mysql -u root -p mysql> create database nextcloud; mysql> grant all privileges on nextcloud.* to 'ncuser'@'localhost' identified by 'password'; mysql> flush privileges; mysql> exit;

Download and Install the latest Nextcloud. Give permissions to Apache.

$ cd /var/www/html
$ sudo wget https://download.nextcloud.com/server/releases/nextcloud-11.0.2.zip
$ sudo unzip nextcloud-11.0.2.zip
$ sudo chown -R www-data:www-data nextcloud

$ cd /var/www/html $ sudo wget https://download.nextcloud.com/server/releases/nextcloud-11.0.2.zip $ sudo unzip nextcloud-11.0.2.zip $ sudo chown -R www-data:www-data nextcloud

Setup Apache

$ sudo nano /etc/apache2/sites-available/nextcloud.conf
 
Alias / "/var/www/html/nextcloud/"
 
 Options +FollowSymlinks
 AllowOverride All
 
  Dav Off
 
 SetEnv HOME /var/www/html/nextcloud
 SetEnv HTTP_HOME /var/www/html/nextcloud

$ sudo nano /etc/apache2/sites-available/nextcloud.conf Alias / "/var/www/html/nextcloud/" Options +FollowSymlinks AllowOverride All Dav Off SetEnv HOME /var/www/html/nextcloud SetEnv HTTP_HOME /var/www/html/nextcloud

Enable Nextcloud. Disable default.

$ sudo a2ensite nextcloud.conf
$ sudo a2dissite 000-default.conf

$ sudo a2ensite nextcloud.conf $ sudo a2dissite 000-default.conf

Enable the following

$ sudo a2enmod rewrite
$ sudo a2enmod headers
$ sudo a2enmod env
$ sudo a2enmod dir
$ sudo a2enmod mime
$ sudo service apache2 restart

$ sudo a2enmod rewrite $ sudo a2enmod headers $ sudo a2enmod env $ sudo a2enmod dir $ sudo a2enmod mime $ sudo service apache2 restart

Open your browser and access your server via IP address or domain name to complete the NextCloud install.

You will be asked to enter a new username and password. Also enter your database credentials to complete the installation.

Filed Under: Cloud, Linux Tagged With: cloud storage, file sharing, file sync, nextcloud, ubuntu 16.04 lts

Working With AWS LightSail

March 14, 2017

Just a quick demo how to work with AWS LightSail. LightSail is AWS lightweight VPS at a fixed price point. You can install just theĀ OS. You can choose either Amazon Linux or Ubuntu OS. If you prefer, you can install any of the several ready-made applications provided by AWS in conjunction with Bitnami. In this example, I installed Ubuntu and Apache just demonstrate how to easy it is to work with LightSail.

Filed Under: Cloud, Linux Tagged With: aws, lightsail

Nextcloud

January 24, 2017

Nextcloud is the next generation open source file storage and file synching platform. It’s similar to Dropbox, Google Drive and Microsoft OneDrive. The main difference is that you run the software on your own server. This is a perfect solution if you’re worried about mass surveillance. It’s safe enough to place on the cloud. Better yet, you can run it on your local network at home. It behaves somewhat similar to a NAS (Network Attached Storage) but with a better web interface, and a few more apps.

In addition, you can install the client software on your Desktop (PC, MAC and Linux) or to any mobile device (iOS, Android and Windows). The clients automatically sync data to the server software that’s installed on a Linux server. Files can also be accessed using WebDav as well. It has an online office, a video chat feature and Outlook email integration, but I’m not really interested with those additional features. I use it primarily for storage and file synching only. It works great by the way.

Give Nextcloud a try.

Filed Under: Cloud, Linux Tagged With: nextcloud

Install S3cmd on Mac

December 29, 2016

Previously, I wrote about installing and accessing Amazon S3 (Simple Storage Service) from Ubuntu using s3cmd command line tool. Interestingly enough, the S3cmd command line tool is also available on the Mac, since MacOS is based on NeXT, which was based on BSD, which is a major variant of Unix. Anyways, you can install s3cmd on the Mac so you can access to Amazon S3 via the command line.

How to Install

$ sudo sudo python setup.py install

$ sudo sudo python setup.py install

Configure

$ s3cmd --configure

$ s3cmd --configure

The configuration will ask you to provide your access key and secret key. You can get those keys from your AWS account or your AWS administrator.

Once it’s configured and you have access to the S3, you can try the following commands.

# list the files
$ s3cmd ls 
# get file sizes in human form
$ s3cmd du -H s3://yourbucket
# create a new bucket
$ s3cmd mb s3://newbucket
# put file into bucket
$ s3cmd put filename.ext s3://bucket/folder
# get file from bucket
$ s3cmd get s3://yourbucket/yourfolder/yourfile
# delete file from bucket
$ s3cmd del s3://yourbucket/yourfolder/yourfile

# list the files $ s3cmd ls # get file sizes in human form $ s3cmd du -H s3://yourbucket # create a new bucket $ s3cmd mb s3://newbucket # put file into bucket $ s3cmd put filename.ext s3://bucket/folder # get file from bucket $ s3cmd get s3://yourbucket/yourfolder/yourfile # delete file from bucket $ s3cmd del s3://yourbucket/yourfolder/yourfile

There are a lot more commands you can explore. Here’s the documentation.

Filed Under: Cloud, Linux, Mac Tagged With: s3cmd

Install S3cmd on Ubuntu

December 22, 2014

If you want to backup your Linux server to Amazon S3 (Simple Storage Service), you need to install a utility called S3cmd which allows you to interact with Amazon’s cloud storage service. You’ll be able to create s3 buckets, upload and retrieve files from your Linux server to the S3.

You can install S3cmd from Ubuntu.

sudo apt-get install s3cmd

sudo apt-get install s3cmd

Next, you need to configure S3cmd using your S3 credentials. You’ll need an Access key and a Secret key from Amazon’s Security Credentials page which you can access from Amazon’s IAM Management Console.

sudo s3cmd --configure

sudo s3cmd --configure

For details on how to fully implement S3cmd, please take a look at this article.

Filed Under: Cloud, Linux Tagged With: amazon, cloud, s3, storage

Cyberduck

October 23, 2014

If you’re looking for a S3 client, check out Cyberduck. It’s a free FTP, SFTP, WebDAV, S3 & OpenStack Swift browser for both Mac and Windows. I started using it primarily to access an Amazon S3 account. Just download the client and select Amazon S3 to access your account.

You will need an Access Key ID and your Secret Access Key for your S3 account. You can get that from the AWS Dashboard under IAM (Identity Access Management). Once you’re authenticated, you can access your files from within Cyberduck. Drag and drop to download and upload. Very simple and intuitive.

Filed Under: Cloud, Linux Tagged With: cyberduck

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 43
  • Go to page 44
  • Go to page 45
  • Home
  • About
  • Archives

Copyright © 2023