Herramientas de usuario

Herramientas del sitio


manuales:urlshortener

¡Esta es una revisión vieja del documento!


[[https://github.com/sapioit/URL-shortener|URL-shortener]]

apt install git apache2 mariadb-server php libapache2-mod-php php7.0-mysql
cd /var/www/
git clone https://github.com/sapioit/URL-shortener
 
mysql
mysql> create database url;
mysql>CREATE user  dnsurl@localhost IDENTIFIED by 'root';
mysql>GRANT ALL PRIVILEGES on url.* to dnsurl@localhost idenfied by 'root';
mysql>flush privileges;
mysql -u dnsurl -p url
 
nano /etc/apache2/sites-enabled/000-default.conf
   DocumentRoot /var/www/URL-shortener
chown -R www-data:www-data /var/www/    
systemctl restart apache2
 
nano URL-shortener/lib/db.php
$db_connection = mysqli_connect(
  'localhost', 'dnsurl', 'root', 'url')
 
http://domain/

[[https://github.com/sapioit/URL-shortener|URL-shortener]]

apt install git apache2 mariadb-server php libapache2-mod-php php7.0-mysql
cd /var/www/
git clone https://github.com/YOURLS/YOURLS
cp YOURLS/user/config-sample.php YOURLS/user/config.php
nano YOURLS/user/config.php
  define( 'YOURLS_DB_USER', 'dnsurl' );
  define( 'YOURLS_DB_PASS', 'root' );
  define( 'YOURLS_DB_NAME', 'yours' );
  define( 'YOURLS_SITE', 'http://dnsurl.localhost.com' );
  define( 'YOURLS_LANG', 'es' ); 
  $yourls_user_passwords = array(
        'usuario' => 'misuperclave',
 
mysql
mysql> create database yours;
mysql>CREATE user  dnsurl@localhost IDENTIFIED by 'root';
mysql>GRANT ALL PRIVILEGES on yours.* to dnsurl@localhost idenfied by 'root';
mysql>flush privileges;
nano /etc/mysql/mariadb.conf.d/50-server.cnf
...
    [mysqld]
    innodb_file_format = Barracuda
    innodb_file_per_table = on
    innodb_default_row_format = dynamic
    innodb_large_prefix = 1
    innodb_file_format_max = Barracuda
...
systemctl restart mysql
mysql -u dnsurl -p yours
 
 
nano /etc/apache2/sites-enabled/000-default.conf
    DocumentRoot /var/www/YOURLS 
    <Directory /var/www/YOURLS/>
        Options -Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
chown -R www-data:www-data /var/www/    
a2enmod  rewrite
systemctl restart apache2
 
nano /var/www/YOURLS/includes/functions-install.php
...
     '`keyword` varchar(600) BINARY NOT NULL,'.
...
 
http://domain/admin/install.php

[[https://github.com/thedevs-network/kutt|Kutt]]

apt install git apache2 postgresql redis-server exim4
nano /etc/postgresql/9.6/main/pg_hba.conf 
  local   all             all                                     md5
systemctl  restart postgresql
 
postgres=# create user dnsurl with encrypted password 'root';
postgres=# create database url with owner dnsurl;
postgres=# alter user dnsurl with superuser;
postgres=# \q
psql -h localhost -U dnsurl -W -d url
 
 
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
bash nodesource_setup.sh
apt-get install -y nodejs
nodejs -v
 
cd /var/www
git clone https://github.com/thedevs-network/kutt
cd kutt
cp .example.env .env
nano .env 
  DEFAULT_DOMAIN="dnsurl.localhost.com"
 
  DB_HOST=localhost
  DB_PORT=5432
  DB_NAME=url
  DB_USER=dnsurl
  DB_PASSWORD=root
  ...
  ADMIN_EMAILS=admin@gmail.com
  ...
  MAIL_HOST=localhost
  MAIL_PORT=25
  MAIL_SECURE=false
  MAIL_USER=root
  MAIL_FROM=root
  MAIL_PASSWORD=pepe
  REPORT_EMAIL=root@localhost
  CONTACT_EMAIL=root@localhost
  ...
 
npm install
npm run dev & # and register on the site
 
psql
postgres=# \c  url
postgres=# select * from users;
postgres=# update  users set verified=true where email='admin@gmail.com';
postgres=# update  users set verification_expires=NULL where email='admin@gmail.com';
postgres=# \q
#Login in kutt

Referencias

manuales/urlshortener.1580066860.txt.gz · Última modificación: por manuel.floresv